package com.homework.HomeAcount.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

/**
 * 测试所用拦截器
 * Project Name:HomeAcount 
 * @author gk
 * TODO
 * Date:2016年4月28日下午7:37:14 
 * Copyright (c) 2016, gkaigk@126.com All Rights Reserved. 
 * @Version 1.0
 */
public class TestInterceptor implements HandlerInterceptor {

	@Override
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		return true;
	}

	@Override
	public void postHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler,
			ModelAndView modelAndView) throws Exception {
		System.out.println("TestInterceptor:postHandle方法！");
	}

	@Override
	public void afterCompletion(HttpServletRequest request,
			HttpServletResponse response, Object handler, Exception ex)
			throws Exception {
		System.out.println("TestInterceptor:afterCompletion方法！");
	}

}
